home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / doom / tw212_sv.zip / TWQWSRC / SERVER.QC < prev    next >
Text File  |  1997-05-07  |  2KB  |  97 lines

  1.  
  2. void() monster_ogre = {remove(self);};
  3. void() monster_demon1 = {remove(self);};
  4. void() monster_shambler = {remove(self);};
  5. void() monster_knight = {remove(self);};
  6. void() monster_army = {remove(self);};
  7. void() monster_wizard = {remove(self);};
  8. void() monster_dog = {remove(self);};
  9. void() monster_zombie = {remove(self);};
  10. void() monster_boss = {remove(self);};
  11. void() monster_tarbaby = {remove(self);};
  12. void() monster_hell_knight = {remove(self);};
  13. void() monster_fish = {remove(self);};
  14. void() monster_shalrath = {remove(self);};
  15. void() monster_enforcer = {remove(self);};
  16. void() monster_oldone = {remove(self);};
  17.  
  18. /*
  19. ==============================================================================
  20.  
  21. MOVETARGET CODE
  22.  
  23. The angle of the movetarget effects standing and bowing direction, but has no effect on movement, which allways heads to the next target.
  24.  
  25. targetname
  26. must be present.  The name of this movetarget.
  27.  
  28. target
  29. the next spot to move to.  If not present, stop here for good.
  30.  
  31. pausetime
  32. The number of seconds to spend standing or bowing for path_stand or path_bow
  33.  
  34. ==============================================================================
  35. */
  36.  
  37. /*
  38. =============
  39. t_movetarget
  40.  
  41. Something has bumped into a movetarget.  If it is a monster
  42. moving towards it, change the next destination and continue.
  43. ==============
  44. */
  45. void() t_movetarget =
  46. {
  47. local entity    temp;
  48.  
  49.     if (other.movetarget != self)
  50.         return;
  51.     
  52.     if (other.enemy)
  53.         return;        // fighting, not following a path
  54.  
  55.     temp = self;
  56.     self = other;
  57.     other = temp;
  58.  
  59.     if (self.classname == "monster_ogre")
  60.         sound (self, CHAN_VOICE, "ogre/ogdrag.wav", 1, ATTN_IDLE);// play chainsaw drag sound
  61.  
  62. //dprint ("t_movetarget\n");
  63.     self.goalentity = self.movetarget = find (world, targetname, other.target);
  64.     self.ideal_yaw = vectoyaw(self.goalentity.origin - self.origin);
  65.     if (!self.movetarget)
  66.     {
  67.         self.pausetime = time + 999999;
  68.         self.th_stand ();
  69.         return;
  70.     }
  71. };
  72.  
  73.  
  74.  
  75. void() movetarget_f =
  76. {
  77.     if (!self.targetname)
  78.         objerror ("monster_movetarget: no targetname");
  79.         
  80.     self.solid = SOLID_TRIGGER;
  81.     self.touch = t_movetarget;
  82.     setsize (self, '-8 -8 -8', '8 8 8');
  83.     
  84. };
  85.  
  86. /*QUAKED path_corner (0.5 0.3 0) (-8 -8 -8) (8 8 8)
  87. Monsters will continue walking towards the next target corner.
  88. */
  89. void() path_corner =
  90. {
  91.     movetarget_f ();
  92. };
  93.  
  94.  
  95.  
  96. //============================================================================
  97.